<template>
  <router-link class="aitem" :to="msg.href" tag="div" :style="{'background-image': `url(${Port + msg.img})`, margin: (margin ? margin : '0 0.3rem 0.3rem'), height: (height ? height : '3rem')}">
      <div>{{msg.title}}</div>
      <div v-if="hot"></div>
  </router-link>
</template>
<script>
import { Get, Post, Port } from "../../../server/ajax"
export default {
  props: ['msg', 'margin', 'height', 'hot'],
  data () {
    return {
        Port: Port
    }
  }
}
</script>
<style scoped>
.aitem{
    position: relative;
    margin: 0 0.3rem 0.3rem;
    height: 3rem;
    background-size: cover;
    background-position: center center;
}
.aitem>div:nth-child(1){
    position: absolute;
    bottom: 0;
    height: 0.8rem;
    line-height: 0.8rem;
    width: 100%;
    padding: 0 0.3rem;
    /* text-align: center; */
    font-size: 0.32rem;
    color: #fff;
    font-weight: bold;
    background-size: cover;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    background-image: url('~@/assets/shdow.png');
}
.aitem>div:nth-child(2){
    position: absolute;
    top: 0;
    left: 0.3rem;
    width: 0.94rem;
    height: 1rem;
    background-size: cover;
    background-image: url('~@/assets/hot.png');
}
</style>
